package com.twu.biblioteca;

/**
 * Created by pchavez on 17/01/14.
 */
public class Book implements Borrowable {
    private String title;
    private Boolean available;
    private String TYPE = "book";

    public Book(String title) {
        this.title = title;
        this.available = true;
    }

    public String getTitle(){
        return title;
    }

    @Override
    public String getType() {
        return TYPE;
    }

    @Override
    public void checkIn() {
        available = true;
    }

    @Override
    public void checkOut() {
        available = false;
    }

    @Override
    public Boolean canBeCheckedIn(){
        return available == false;
    }

    @Override
    public Boolean canBeCheckedOut() {
        return available;
    }
}
